package com.atde._05_behavioral_design_patterns.responsibilitychain.oa;


import com.atde._03_creational_design_patterns.prototype.deepclone.DeepProtoType;

/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._05_behavioral_design_patterns.responsibilitychain.oa
 * @Author: Del
 * @CreateTime: 2025-06-30  16:55
 * @Description: 职责链模式 ---  测试类
 * @Version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        // 创建一个请求
        PurchaseRequest request = new PurchaseRequest(1, 300, 1);
        // 创建相关的审批人
        DepartmentApprover departmentApprover = new DepartmentApprover("胡主任");
        CollegeApprover collegeApprove = new CollegeApprover("卢院长");
        ViceShcoolMasterApprover viceShcoolMasterApprove = new ViceShcoolMasterApprover("李副校长");
        SchoolMasterApprover schoolMasterApprove = new SchoolMasterApprover("王校长");

        departmentApprover.setSuccessor(collegeApprove);
        collegeApprove.setSuccessor(viceShcoolMasterApprove);
        viceShcoolMasterApprove.setSuccessor(schoolMasterApprove);
        schoolMasterApprove.setSuccessor(departmentApprover);


        schoolMasterApprove.processRequest(request);
    }
}
